package com.gibs.peixunapi.enums;

import lombok.Data;

/**
 * @author liangjiawei
 * @date 2020/08/20/11:16
 * @Version 1.0
 * @Description:
 */
public enum ResultEnum {
    NETWORK_ERROR(9999,"网络错误，待会重试"),
    UNKONW_ERROR(-1, "未知错误"),
    SUCCESS(200, "成功"),
    SERVER_ERROR(500,"服务器错误"),
    CREATE_SUCCESS(200,"新增成功"),
    CREATE_FAIL(411,"新增失败"),
    DELETE_FAIL(420,"删除失败"),
    DELETE_SUCCESS(200,"删除成功"),
    UPDATE_SUCCESS(200, "更新数据成功"),
    UPDATE_FAIL(431, "更新数据失败"),
    GET_SUCCESS(200,"查找成功"),
    FIND_FAIL(441, "查找失败"),
    FIND_SUCCESS(200, "查找成功"),
    DATA_NOT_FIND(442, "找不到数据"),
    PARAM_ERROR(450, "参数错误"),
    ;

    private Integer code;
    private String msg;

    ResultEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
